import { axios } from '@/utils/request'

/**
 * 修改
 * @params data
 * {
    {"createBy":{"description":"创建人","type":"string"}},
    {"createDate":{"description":"创建时间","type":"string"}},
    {"id":{"description":"$column.comments","type":"integer"}},
    {"modelName":{"description":"对应模型名称","type":"string"}},
    {"modifyBy":{"description":"修改人","type":"string"}},
    {"modifyDate":{"description":"修改时间","type":"string"}},
    {"tableName":{"description":"表名","type":"string"}}
   }
 */
export function putUdaModelTable (data) {
  return axios({
    method: 'put',
    url: 'uda/model-table',
    data
  })
}

/**
 * 列表
 * @params params
 *
 */
export function getUdaModelTableList (params) {
  return axios({
    method: 'get',
    url: 'uda/model-table/list',
    params
  })
}

/**
 * 分页列表
 * @params params
 * {
    {"pageNo":{"required":false,"type":"integer","default":1}},
    {"modelName":{"required":false,"type":"string"}},
    {"pageSize":{"required":false,"type":"integer","default":20}}
   }
 */
export function getUdaModelTablePageList (params) {
  return axios({
    method: 'get',
    url: 'uda/model-table/page/list',
    params
  })
}
